PROJECT = jabber
OBJECTS = jabber.o
SONAME = $(PROJECT).so

CFLAGS=`pkg-config --cflags lua5.1`
LIBS=`pkg-config --libs lua5.1 gloox`


all: build

build: $(SONAME)

$(SONAME): $(OBJECTS)
	g++ -shared -Wl,-soname,$@ -o $@ $^ $(LIBS)

%.o: %.cpp
	g++ -fPIC -c $(CFLAGS) $<

clean:
	rm -f $(SONAME) $(OBJECTS)

run: build
	./test.lua


